// gui tin hieu den server
socket.emit('checkLogin', {sendUsername: 'tuan', sendPassword: '12' });

// nhan tin hieu tu server
socket.on("checkLogin", function(data) {
    if(data.allUser==null){
        $('#error').html(data.error);
    } else {
        var listAllUser = '';
        for(var i=0;i<data.allUser.length;i++){
            listAllUser += '<tr class="odd gradeX">';
            listAllUser += '<td>' + data.allUser[i].userID + '</td>';
            listAllUser += '<td>' + data.allUser[i].username + '</td>';
            listAllUser += '<td><input type="checkbox" id="checkbox' + i + '"></td>';
            listAllUser += '</tr>';
        }
        // tim id dataTable roi gan code vao
        $('#dataTable').html(listAllUser);
    }
});